/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.jfonia.model.elements;

import org.jfonia.connect5.basics.BasicValueNode;
import org.jfonia.connect5.basics.MutableValueNode;

/**
 *
 * @author Rik Bauwens
 */
public class Beat extends MusicalElement
{
        private MutableValueNode<Boolean> measureNode;

        public Beat()
        {
                this(0);
        }

        public Beat(int difference)
        {
                super(difference);
                measureNode = new BasicValueNode<Boolean>(false);
        }

        public boolean isMeasureBeat()
        {
                return measureNode.getValue();
        }

        public MutableValueNode<Boolean> getMeasureBeatNode()
        {
                return measureNode;
        }

        public Beat setMeasureBeat(boolean measureBeat)
        {
                measureNode.setValue(measureBeat);
                return this;
        }

        @Override
        public Beat clone()
        {
                Beat beat = new Beat(getDifference());
                //chord.setChord(chordNode.getValue());
                return beat;
        }
}